<template>
  <view class="container">


    <view style="padding: 30rpx">
      <uv-parse :content="content" :tag-style="style"></uv-parse>
    </view>
  </view>
</template>

<script>
import navbarMixin from "@/common/mixin/navbar.js";
import { getArticle } from "@/api/index.js";
import { addImageDomainPrefix } from "../../utils/util";


export default {
  mixins: [navbarMixin],

  data() {
    return {
      content: ``,
      style: {
        video: 'width: 100%'
      }
    };
  },

  /**
   * 生命周期函数--监听页面加载
   */
  async onLoad(options) {
    await this.getArticle();
  },
  // 挂载
  mounted() {

  },

  methods: {
    /**
     * 返回上一页
     */
    goBack() {
      uni.navigateBack({
        delta: 1,
      });
    },
    async getArticle() {
      await getArticle({ id: 9 }).then((res) => {
        this.content = addImageDomainPrefix(res.content);
      });
    },
  },

  /**
   * 分享当前页面
   */
  onShareAppMessage() {
    return {
      title: "蓝牙授权",
      path: "/pages/newbluetooth/index",
    };
  },
};
</script>

<style lang="scss" scoped>
.container {
  min-height: 100vh;
  background: #f8f9fa;
}

.page-content {
  padding: 40rpx;

  .content-item {
    margin-bottom: 30rpx;

    .content-text {
      font-size: 32rpx;
      color: #333333;
      line-height: 1.6;
    }
  }
}
</style>
